package com.ys.erp.entity.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ys.erp.entity.data.bean.Order;
import com.ys.erp.entity.mapper.OrderMapper;
import com.ys.erp.entity.service.IOrderService;
import jakarta.validation.constraints.NotBlank;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Objects;

/**
 * @author lwj
 * @date 2023/4/28
 */
    
@Service
@RequiredArgsConstructor
public class IOrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {

    @Override
    public Order getByNo(@NotBlank String orderNo) {
        QueryWrapper<Order> orderQw = new QueryWrapper<>();
        orderQw.lambda().eq(Order::getOrderSerialNumber, orderNo);
        return this.getOne(orderQw);
    }

}
